//
//  LSLevinBookDetailTableViewCell.m
//  LaSaCivilAffairsDepartment
//
//  Created by 聂志康 on 2019/8/21.
//  Copyright © 2019 wpkj. All rights reserved.
//

#import "LSLevinBookDetailTableViewCell.h"

@implementation LSLevinBookDetailTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.selectionStyle = UITableViewCellEditingStyleNone;
        [self.contentView addSubview:self.contentLabel];
        [self.contentView addSubview:self.mainTitleLabel];
    }
    return self;
}

- (void)layoutSubviews {
    [super layoutSubviews];
    WS
    [self.contentLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(weakSelf.contentView.mas_top).with.offset(10);
        make.left.equalTo(weakSelf.mainTitleLabel.mas_right);
        make.bottom.equalTo(weakSelf.contentView.mas_bottom).with.offset(-10);
        make.right.equalTo(weakSelf.contentView.mas_right).with.offset(-12);
    }];
}

- (UILabel *)mainTitleLabel {
    if (!_mainTitleLabel) {
        _mainTitleLabel = [[UILabel alloc] initWithFrame:CGRectMake(12, 12, 20, 15)];
        _mainTitleLabel.font = [UIFont systemFontOfSize:15];
        _mainTitleLabel.textColor = hexColor(333333);
    }
    return _mainTitleLabel;
}

- (UILabel *)contentLabel {
    if (!_contentLabel) {
        _contentLabel = [[UILabel alloc] init];
        _contentLabel.font = [UIFont systemFontOfSize:15];
        _contentLabel.textColor = hexColor(333333);
        _contentLabel.numberOfLines = 0;
    }
    return _contentLabel;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
